package com.kaifamiao.service.impl;

import com.kaifamiao.dao.IAccountDao;
import com.kaifamiao.model.Account;
import com.kaifamiao.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lucien-ma
 * @date 2021/8/25
 * @apiNote
 */
@Service
public class IAccountServiceImpl implements IAccountService {

    private IAccountDao accountDao;

    @Autowired
    public IAccountServiceImpl(IAccountDao accountDao) {
        this.accountDao = accountDao;
    }

    @Override
    public List<Account> findAll() {
        return accountDao.findAll();
    }

    @Override
    public int save(Account account) {
        return accountDao.save(account);
    }

    @Override
    public int update(Account account) {
        return accountDao.update(account);
    }

    @Override
    public int delete(Integer id) {
        return accountDao.delete(id);
    }
}
